<template>
	<div class="order-show-audit-state">
		<el-steps :space="250"  align-center center :active="stateIndex" :process-status="'finish'" finish-status="success">
			<el-step title="技术审核通过" description="2017-09-21 14:04:22"></el-step>{{stateIndex}}
			<el-step title="商务审核通过" description="2017-09-21 14:04:22"></el-step>
			<el-step title="财务审核通过" description="2017-09-21 14:04:22"></el-step>
			<el-step title="管理员审核通过" description="2017-09-21 14:04:22"></el-step>
		</el-steps>

		<!--<div class="flow-list" v-if="order.flows !== []">
			<el-row v-for="item in order.flows" :key="item.id" class="item" :gutter="10">
				<el-col class="left" :span="2">
					<div class="">
						{{item.id}}
					</div>
				</el-col>
				<el-col class="right" :span="22">
					<div class="">
						{{item.content}}
					</div>
				</el-col>
			</el-row>
		</div>-->

		<div class="audit-state-panel">
			<!-- 待审核 -->
			<!-- <div class="ship">
        <el-button type="success">通过并安排物流运输</el-button>
        <el-button type="danger">不通过</el-button>
      </div> -->

			<!-- 待确认 -->
			<!-- <div class="ship">
        <el-button type="success">通过</el-button>
        <el-button type="danger">不通过</el-button>
      </div> -->

			<!-- 一键审核 -->
			<!-- <div class="ship">
        <el-button type="warning">跳过审核节点，一件审核并安排物流运输</el-button>
      </div> -->
		</div>

		<el-row class="audit-user-list" :gutter="20">
			<el-col :span="12" v-for="item in audit_users" :key="item.id">
				<div class="item audit-mar">
					<img v-vImg="item.headimg" alt="">
					<div class="">
						<h1 v-text="item.real_name"></h1>
						<span v-text="item.department"></span>
						<span v-text="item.user_role"></span>
						<span v-text="item.tel"></span>
					</div>
				</div>
			</el-col>
		</el-row>
	
	</div>
</template>

<script>
	import { mapGetters, mapActions } from 'vuex'
	import filter from '../../../utils/filters'
	export default {
		computed: {
			...mapGetters('orders', ['order','audit_users']),
			stateIndex:function(){
				var z
				console.log(this.audit_users)
				for(var i=0;i<this.audit_users.length;i++){
					if(this.audit_users[i].confirm==true){
						z=i+1
					}
				}
				return parseInt(z)
	   	 	}
		},
		methods: {
			...mapActions('orders', ['setAuditUsers']),
		},
	}
</script>
<style>
	.audit-mar{
		margin-bottom: 3%;
	}
</style>